<?php if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) header("Location: index.php"); extract($_GET); 
$view = ( isset($view) ) ? $view : null; $id = ( isset($id) ) ? $id : 0;  $cat_id = ( isset($cat_id) ) ? $cat_id : 0;
$is_home = ( basename($_SERVER['PHP_SELF']) == "index.php" && $view == null ) ? true : false; 
require_once("sdk/facebook_header.php"); 
if( DEBUG && REQUIRE_LIKE ) { $like = true; } if ( REQUIRE_LIKE && !$like ) { header("Location: like.php"); } 
$total_cats = 7; // total rows of categories
$order_link = ( isset($order) && $order == 'desc' ) ? 'asc' : 'desc';
$sort = ( !isset($sort) ) ? null : $sort;
?>
<!DOCTYPE HTML>
<html lang="ka">
    <head>
        <meta charset="UTF-8">    
        <?php if( !DEBUG && REDIRECT ): ?>
        <script type="text/javascript">
		    var url = '<?php echo FB_PAGE_URL; ?>'
		    if(top === self) {
				top.location.href = url;
		    }
		</script>
		<?php endif; ?>
		<link rel="stylesheet" type="text/css" href="media/css/main.css" media="all" />        
        <link rel="stylesheet" type="text/css" href="media/css/style.css" media="all" />
        <?php if( $view == "categories" ): ?>
    	<link rel="stylesheet" type="text/css" href="media/css/jscrollpane.css" media="all" />
    	<?php endif; ?>    	
        <link rel="stylesheet" type="text/css" href="media/css/media.css" media="all" />
        <!--[if IE 7]>
        	<link rel="stylesheet" type="text/css" href="media/css/ie7.css" media="all" />
        <![endif]-->
        <?php if( DEBUG ) : ?>
    	<style type="text/css">
    		html, body { overflow:auto }
    	</style>	
    	<?php endif; ?>
        <title><?php echo TITLE; ?></title>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="logo">                	
                    <a href="<?php echo ( LOGO_ON_HOME ) ? "./" : LINK;  ?>" <?php echo ( LOGO_ON_HOME ) ? '' : 'target="_blank"';  ?> title="<?php echo COMPANY; ?>"><?php echo COMPANY; ?></a>
                </div><!-- #logo -->
            </div><!-- #header -->            
            <div id="content"<?php echo ( ROUNDED_CORNER ) ? ' class="content-radius"' : ''; ?>>          